Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[61] Re-introduce block editor visual preview #111

Open
wants to merge 31 commits into
base: develop
Choose a base branch
from

Conversation

g-elwell
Copy link
Member

@g-elwell g-elwell commented Oct 1, 2024

Description

This PR re-introduces the visual block editor preview that was previously included before we switched to a code view for MVP. The preview can now be toggled between visual and code modes, and the visual mode can be set to display either a predefined block preview, or individual blocks based on the currently selected navigation item.

Fixes #61

Change Log

  • Bumps the minimum WordPress version to 6.4, required for the block editor preview
  • Adds a block editor for previewing style changes visually
  • Adds a toggle to switch between visual and code previews
  • Adds a size selector to toggle between desktop/tablet/mobile widths for the visual preview
  • Adds a 'follow' button to enable the visual preview to render block/element previews based on the navigation
  • Minor refactoring and tidying of code

Steps to test

  • Install the plugin, navigate to Appearance > Styles Editor
  • Check the visual preview reflects style changes
  • Toggle the 'preview mode' to switch between code/visual previews
  • Toggle the 'preview size' to switch between desktop/tablet/mobile widths
  • Turn on the preview 'follow' button (eye symbol) and check the visual preview will render the correct block/element based on the selected item in the navigation

Screenshots/Videos

Screen.Capture.on.2024-10-01.at.21-31-46.1.mp4

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@g-elwell g-elwell self-assigned this Oct 1, 2024
@g-elwell g-elwell added the enhancement New feature or request label Oct 1, 2024
@g-elwell g-elwell changed the base branch from main to develop October 1, 2024 21:41
chrishall0
chrishall0 previously approved these changes Oct 2, 2024
Copy link
Contributor

@chrishall0 chrishall0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, and code LGTM!

@thatisrich thatisrich mentioned this pull request Oct 7, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor visual preview (post MVP)
3 participants